﻿using System;
using Assist;
using Autodesk.Revit.DB;
using YJKArchUtils.Utils;

namespace YJKBuildingProfile.YJKBuildingProfile.LoopSearch
{
	public class Pole2D
	{
		public ElementId ComponentId
		{
			get
			{
				return this.m_ComponentId;
			}
		}

		public bool IsPositiveDirection
		{
			get
			{
				return this.m_PositiveDirection;
			}
		}

		public bool IsArcPole
		{
			get
			{
				return !Geometry.IsEqual(this.m_Bulge, 0.0);
			}
		}

		public XYZ StartPoint
		{
			get
			{
				return this.m_ptStart;
			}
		}

		public XYZ EndPoint
		{
			get
			{
				return this.m_ptEnd;
			}
		}

		public XYZ PositiveStartPoint
		{
			get
			{
				return this.m_ptPositiveStart;
			}
		}

		public XYZ PositiveEndPoint
		{
			get
			{
				return this.m_ptPositiveEnd;
			}
		}

		public XYZ NegativeStartPoint
		{
			get
			{
				return this.m_ptNegativeStart;
			}
		}

		public XYZ NegativeEndPoint
		{
			get
			{
				return this.m_ptNegativeEnd;
			}
		}

		public double Bulge
		{
			get
			{
				return this.m_Bulge;
			}
		}

		public double PositiveHalfWidth
		{
			get
			{
				double result;
				if (this.IsArcPole)
				{
					XYZ xyz = null;
					Geometry.GetCenterWithBulge(this.m_ptStart, this.m_ptEnd, this.m_Bulge, ref xyz);
					result = this.m_ptPositiveStart.DistanceTo(xyz) - this.Radius;
				}
				else
				{
					result = Geometry.CalculateFootPoint(this.m_ptStart, this.m_ptEnd, this.m_ptPositiveStart).DistanceTo(this.m_ptPositiveStart);
				}
				return result;
			}
		}

		public double NegativeHalfWidth
		{
			get
			{
				double result;
				if (this.IsArcPole)
				{
					XYZ xyz = null;
					Geometry.GetCenterWithBulge(this.m_ptStart, this.m_ptEnd, this.m_Bulge, ref xyz);
					result = this.Radius - this.m_ptNegativeStart.DistanceTo(xyz);
				}
				else
				{
					result = Geometry.CalculateFootPoint(this.m_ptStart, this.m_ptEnd, this.m_ptNegativeStart).DistanceTo(this.m_ptNegativeStart);
				}
				return result;
			}
		}

		public XYZ Center
		{
			get
			{
				if (Geometry.IsEqual(this.m_Bulge, 0.0))
				{
					return null;
				}
				XYZ result = null;
				Geometry.GetCenterWithBulge(this.m_ptStart, this.m_ptEnd, this.m_Bulge, ref result);
				return result;
			}
		}

		public double Radius
		{
			get
			{
				if (Geometry.IsEqual(this.m_Bulge, 0.0))
				{
					return double.MaxValue;
				}
				double result = 0.0;
				Geometry.GetRadiusWithBulge(this.m_ptStart, this.m_ptEnd, this.m_Bulge, ref result);
				return result;
			}
		}

		public XYZ Normal
		{
			get
			{
				XYZ xyz;
				if (this.IsArcPole)
				{
					xyz = XYZ.BasisZ;
					if (Geometry.LessThan(this.Bulge, 0.0))
					{
						xyz = -xyz;
					}
				}
				else
				{
					xyz = (this.EndPoint - this.StartPoint).Normalize();
				}
				return xyz;
			}
		}

		public bool SameAs(Pole2D rhs)
		{
			return (this.IsAlmostEqualToWith2DPt(this.m_ptStart, rhs.m_ptStart) && this.IsAlmostEqualToWith2DPt(this.m_ptEnd, rhs.m_ptEnd) && Geometry.IsEqual(this.m_Bulge, rhs.m_Bulge)) || (this.IsAlmostEqualToWith2DPt(this.m_ptStart, rhs.m_ptEnd) && this.IsAlmostEqualToWith2DPt(this.m_ptEnd, rhs.m_ptStart) && Geometry.IsEqual(-this.m_Bulge, rhs.m_Bulge));
		}

		public void To2D()
		{
			this.m_ptStart = new XYZ(this.m_ptStart.X, this.m_ptStart.Y, 0.0);
			this.m_ptEnd = new XYZ(this.m_ptEnd.X, this.m_ptEnd.Y, 0.0);
			this.m_ptPositiveStart = new XYZ(this.m_ptPositiveStart.X, this.m_ptPositiveStart.Y, 0.0);
			this.m_ptPositiveEnd = new XYZ(this.m_ptPositiveEnd.X, this.m_ptPositiveEnd.Y, 0.0);
			this.m_ptNegativeStart = new XYZ(this.m_ptNegativeStart.X, this.m_ptNegativeStart.Y, 0.0);
			this.m_ptNegativeEnd = new XYZ(this.m_ptNegativeEnd.X, this.m_ptNegativeEnd.Y, 0.0);
		}

		public double Length()
		{
			if (this.IsArcPole)
			{
				XYZ xyz = null;
				Geometry.GetCenterWithBulge(this.StartPoint, this.EndPoint, this.Bulge, ref xyz);
				double num = xyz.DistanceTo(this.StartPoint);
				double angle = Geometry.getAngle(xyz, this.StartPoint);
				double angle2 = Geometry.getAngle(xyz, this.EndPoint);
				double num2 = Geometry.BetweenTheAngles(angle, angle2, true);
				if (Geometry.LessThan(this.Bulge, 0.0))
				{
					num2 = Geometry.BetweenTheAngles(angle2, angle, true);
				}
				return num2 * num;
			}
			return this.StartPoint.DistanceTo(this.EndPoint);
		}

		private bool IsAlmostEqualToWith2DPt(XYZ pt1, XYZ pt2)
		{
			XYZ xyz = new XYZ(pt1.X, pt1.Y, 0.0);
			XYZ xyz2 = new XYZ(pt2.X, pt2.Y, 0.0);
			return Geometry.Lessthan_Or_Equal(xyz.DistanceTo(xyz2), 0.0001);
		}

		private Pole2D._tagPositionType TestPointPositionType(XYZ ptCurNodePos)
		{
			double val = this.m_ptStart.DistanceTo(ptCurNodePos);
			double val2 = this.m_ptEnd.DistanceTo(ptCurNodePos);
			if (Geometry.LessThan(val, val2, 1E-20))
			{
				return Pole2D._tagPositionType._StartNode;
			}
			if (Geometry.GreaterThan(val, val2, 1E-20))
			{
				return Pole2D._tagPositionType._EndNode;
			}
			return Pole2D._tagPositionType._OtherPoint;
		}

		public bool GetAngle(XYZ ptCurNodePos, ref double curAngle)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				if (!this.IsArcPole)
				{
					curAngle = Geometry.getAngle(this.m_ptStart, this.m_ptEnd);
				}
				else if (Geometry.LessThan(this.m_Bulge, 0.0))
				{
					XYZ ptCenter = new XYZ(0.0, 0.0, 0.0);
					Geometry.GetCenterWithBulge(this.m_ptStart, this.m_ptEnd, this.m_Bulge, ref ptCenter);
					curAngle = Geometry.getAngle(ptCenter, this.m_ptStart);
					curAngle = Geometry.formatAngle(curAngle - Math.PI*.5);
				}
				else
				{
					XYZ ptCenter2 = new XYZ(0.0, 0.0, 0.0);
					Geometry.GetCenterWithBulge(this.m_ptStart, this.m_ptEnd, this.m_Bulge, ref ptCenter2);
					curAngle = Geometry.getAngle(ptCenter2, this.m_ptStart);
					curAngle = Geometry.formatAngle(curAngle + Math.PI*.5);
				}
				return true;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				if (!this.IsArcPole)
				{
					curAngle = Geometry.getAngle(this.m_ptEnd, this.m_ptStart);
				}
				else if (Geometry.LessThan(this.m_Bulge, 0.0))
				{
					XYZ ptCenter3 = new XYZ(0.0, 0.0, 0.0);
					Geometry.GetCenterWithBulge(this.m_ptStart, this.m_ptEnd, this.m_Bulge, ref ptCenter3);
					curAngle = Geometry.getAngle(ptCenter3, this.m_ptEnd);
					curAngle = Geometry.formatAngle(curAngle + Math.PI*.5);
				}
				else
				{
					XYZ ptCenter4 = new XYZ(0.0, 0.0, 0.0);
					Geometry.GetCenterWithBulge(this.m_ptStart, this.m_ptEnd, this.m_Bulge, ref ptCenter4);
					curAngle = Geometry.getAngle(ptCenter4, this.m_ptEnd);
					curAngle = Geometry.formatAngle(curAngle - Math.PI*.5);
				}
				return true;
			}
			return false;
		}

		public bool GetWinding(XYZ ptCurNodePos, ref double winding)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				winding = 1.0;
				if (!this.IsArcPole)
				{
					winding = 0.0;
					return true;
				}
				if (Geometry.LessThan(this.m_Bulge, 0.0))
				{
					winding = -1.0;
				}
				winding *= this.Length() / this.Radius;
				return true;
			}
			else
			{
				if (tagPositionType != Pole2D._tagPositionType._EndNode)
				{
					return false;
				}
				winding = -1.0;
				if (!this.IsArcPole)
				{
					winding = 0.0;
					return true;
				}
				if (Geometry.LessThan(this.m_Bulge, 0.0))
				{
					winding = 1.0;
				}
				winding *= this.Length() / this.Radius;
				return true;
			}
		}

		public void SetIsPositiveDirection(XYZ ptCurNodePos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				this.m_PositiveDirection = true;
				return;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				this.m_PositiveDirection = false;
			}
		}

		public XYZ CurStartPoint(XYZ ptCurNodePos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				return this.m_ptStart;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				return this.m_ptEnd;
			}
			return null;
		}

		public XYZ CurEndPoint(XYZ ptCurNodePos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				return this.m_ptEnd;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				return this.m_ptStart;
			}
			return null;
		}

		public double CurBulge(XYZ ptCurNodePos)
		{
			double result = 0.0;
			if (!this.IsArcPole)
			{
				return result;
			}
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				result = this.m_Bulge;
			}
			else if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				result = -this.m_Bulge;
			}
			return result;
		}

		public XYZ CurPositiveStartPoint(XYZ ptCurNodePos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				return this.m_ptPositiveStart;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				return this.m_ptNegativeEnd;
			}
			return null;
		}

		public XYZ CurPositiveEndPoint(XYZ ptCurNodePos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				return this.m_ptPositiveEnd;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				return this.m_ptNegativeStart;
			}
			return null;
		}

		public bool SetCurPositiveStartPoint(XYZ ptCurNodePos, XYZ ptNewPos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				this.m_ptPositiveStart = ptNewPos;
				return true;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				this.m_ptNegativeEnd = ptNewPos;
				return true;
			}
			return false;
		}

		public bool SetCurPositiveEndPoint(XYZ ptCurNodePos, XYZ ptNewPos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				this.m_ptPositiveEnd = ptNewPos;
				return true;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				this.m_ptNegativeStart = ptNewPos;
				return true;
			}
			return false;
		}

		public XYZ CurNegativeStartPoint(XYZ ptCurNodePos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				return this.m_ptNegativeStart;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				return this.m_ptPositiveEnd;
			}
			return null;
		}

		public XYZ CurNegativeEndPoint(XYZ ptCurNodePos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				return this.m_ptNegativeEnd;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				return this.m_ptPositiveStart;
			}
			return null;
		}

		public bool SetCurNegativeStartPoint(XYZ ptCurNodePos, XYZ ptNewPos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				this.m_ptNegativeStart = ptNewPos;
				return true;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				this.m_ptPositiveEnd = ptNewPos;
				return true;
			}
			return false;
		}

		public bool SetCurNegativeEndPoint(XYZ ptCurNodePos, XYZ ptNewPos)
		{
			Pole2D._tagPositionType tagPositionType = this.TestPointPositionType(ptCurNodePos);
			if (tagPositionType == Pole2D._tagPositionType._StartNode)
			{
				this.m_ptNegativeEnd = ptNewPos;
				return true;
			}
			if (tagPositionType == Pole2D._tagPositionType._EndNode)
			{
				this.m_ptPositiveStart = ptNewPos;
				return true;
			}
			return false;
		}

		public static bool MergeTwoPole(Pole2D pole1, Pole2D pole2, ref Pole2D mergePole)
		{
			if (pole1.IsArcPole != pole2.IsArcPole)
			{
				return false;
			}
			XYZ xyz;
			XYZ xyz2;
			double num;
			double num2;
			double val;
			double val2;
			if (pole1.StartPoint.IsAlmostEqualTo(pole2.EndPoint))
			{
				xyz = pole2.StartPoint;
				xyz2 = pole1.EndPoint;
				num = pole1.PositiveHalfWidth;
				num2 = pole1.NegativeHalfWidth;
				val = pole2.PositiveHalfWidth;
				val2 = pole2.NegativeHalfWidth;
			}
			else if (pole1.StartPoint.IsAlmostEqualTo(pole2.StartPoint))
			{
				xyz = pole1.EndPoint;
				xyz2 = pole2.EndPoint;
				num = pole1.NegativeHalfWidth;
				num2 = pole1.PositiveHalfWidth;
				val = pole2.PositiveHalfWidth;
				val2 = pole2.NegativeHalfWidth;
			}
			else if (pole1.EndPoint.IsAlmostEqualTo(pole2.StartPoint))
			{
				xyz = pole1.StartPoint;
				xyz2 = pole2.EndPoint;
				num = pole1.PositiveHalfWidth;
				num2 = pole1.NegativeHalfWidth;
				val = pole2.PositiveHalfWidth;
				val2 = pole2.NegativeHalfWidth;
			}
			else
			{
				if (!pole1.EndPoint.IsAlmostEqualTo(pole2.EndPoint))
				{
					return false;
				}
				xyz = pole1.StartPoint;
				xyz2 = pole2.StartPoint;
				num = pole1.PositiveHalfWidth;
				num2 = pole1.NegativeHalfWidth;
				val = pole2.NegativeHalfWidth;
				val2 = pole2.PositiveHalfWidth;
			}
			if (!Geometry.IsEqual(num, val) || !Geometry.IsEqual(num2, val2))
			{
				return false;
			}
			if (pole1.IsArcPole)
			{
				if (!Geometry.IsEqual(pole1.Normal, pole2.Normal))
				{
					return false;
				}
				if (Geometry.IsEqual(xyz, xyz2))
				{
					return false;
				}
				bool isAnticlockwise = false;
				if (Geometry.IsEqual(pole1.Normal, XYZ.BasisZ))
				{
					isAnticlockwise = true;
				}
				double val3 = pole1.Center.DistanceTo(pole2.Center);
				double val4 = Math.Abs(pole1.Radius - pole2.Radius);
				if (Geometry.GreaterThan(val3, AssistFunc.mmToFeet(1.0)) || Geometry.GreaterThan(val4, AssistFunc.mmToFeet(1.0)))
				{
					return false;
				}
				Geometry.GetBulge(xyz, xyz2, pole1.Center, isAnticlockwise);
				mergePole = Pole2D.NewStructure2DPole(pole1.ComponentId, xyz, xyz2, pole1.Center, pole1.Normal, num, num2);
			}
			else
			{
				if (!Geometry.IsParallel(pole1.Normal, pole2.Normal, 1E-09))
				{
					return false;
				}
				mergePole = Pole2D.NewStructure2DPole(pole1.ComponentId, xyz, xyz2, num, num2);
			}
			return !Geometry.IsEqual(mergePole.Length(), 0.0, 0.0001);
		}

		public Pole2D()
		{
		}

		public Pole2D(Pole2D rhs)
		{
			this.m_ComponentId = rhs.m_ComponentId;
			this.m_ptStart = rhs.m_ptStart;
			this.m_ptEnd = rhs.m_ptEnd;
			this.m_Bulge = rhs.m_Bulge;
			this.m_ptPositiveStart = rhs.m_ptPositiveStart;
			this.m_ptPositiveEnd = rhs.m_ptPositiveEnd;
			this.m_ptNegativeStart = rhs.m_ptNegativeStart;
			this.m_ptNegativeEnd = rhs.m_ptNegativeEnd;
			this.m_PositiveDirection = rhs.m_PositiveDirection;
		}

		public Pole2D(ElementId componentId, XYZ ptStart, XYZ ptEnd, double bulge, XYZ ptPositiveStart, XYZ ptPositiveEnd, XYZ ptNegativeStart, XYZ ptNegativeEnd, bool positiveDirection)
		{
			this.m_ComponentId = componentId;
			this.m_ptStart = Pole2D.To2D(ptStart);
			this.m_ptEnd = Pole2D.To2D(ptEnd);
			this.m_Bulge = bulge;
			this.m_ptPositiveStart = Pole2D.To2D(ptPositiveStart);
			this.m_ptPositiveEnd = Pole2D.To2D(ptPositiveEnd);
			this.m_ptNegativeStart = Pole2D.To2D(ptNegativeStart);
			this.m_ptNegativeEnd = Pole2D.To2D(ptNegativeEnd);
			this.m_PositiveDirection = positiveDirection;
		}

		public static Pole2D NewStructure2DPole(ElementId id, XYZ ptStart, XYZ ptEnd, double posiHalfWidth, double negaHalfWidth)
		{
			XYZ xyz = Geometry.RotateTo((ptEnd - ptStart).Normalize(), -Math.PI*.5, XYZ.BasisZ);
			XYZ xyz2 = xyz.Negate();
			xyz *= posiHalfWidth;
			xyz2 *= negaHalfWidth;
			XYZ ptPositiveStart = ptStart + xyz;
			XYZ ptPositiveEnd = ptEnd + xyz;
			XYZ ptNegativeStart = ptStart + xyz2;
			XYZ ptNegativeEnd = ptEnd + xyz2;
			return new Pole2D(id, ptStart, ptEnd, 0.0, ptPositiveStart, ptPositiveEnd, ptNegativeStart, ptNegativeEnd, true);
		}

		public static Pole2D NewStructure2DPole(ElementId id, XYZ ptStart, XYZ ptEnd, XYZ ptCenter, XYZ normal, double posiHalfWidth, double negaHalfWidth)
		{
			if (!normal.IsAlmostEqualTo(XYZ.BasisZ))
			{
				XYZ xyz = ptStart;
				ptStart = ptEnd;
				ptEnd = xyz;
			}
			double bulge = Geometry.GetBulge(ptStart, ptEnd, ptCenter, true);
			double num = ptCenter.DistanceTo(ptStart);
			XYZ xyz2 = (ptStart - ptCenter).Normalize() * (num + posiHalfWidth);
			XYZ xyz3 = (ptEnd - ptCenter).Normalize() * (num + posiHalfWidth);
			XYZ xyz4 = (ptStart - ptCenter).Normalize() * (num - negaHalfWidth);
			XYZ xyz5 = (ptEnd - ptCenter).Normalize() * (num - negaHalfWidth);
			XYZ ptPositiveStart = ptCenter + xyz2;
			XYZ ptPositiveEnd = ptCenter + xyz3;
			XYZ ptNegativeStart = ptCenter + xyz4;
			XYZ ptNegativeEnd = ptCenter + xyz5;
			return new Pole2D(id, ptStart, ptEnd, bulge, ptPositiveStart, ptPositiveEnd, ptNegativeStart, ptNegativeEnd, true);
		}

		public static Pole2D TransformWallToStructure2DPole(Wall wall)
		{
			double width = wall.Width;
			Pole2D result = null;
			Curve curve = (wall.Location as LocationCurve).Curve;
			XYZ ptStart = Pole2D.To2D(curve.GetEndPoint(0));
			XYZ ptEnd = Pole2D.To2D(curve.GetEndPoint(1));
			Line line = curve as Line;
			if (null != line)
			{
				result = Pole2D.NewStructure2DPole(wall.Id, ptStart, ptEnd, width / 2.0, width / 2.0);
			}
			Arc arc = curve as Arc;
			if (null != arc)
			{
				result = Pole2D.NewStructure2DPole(wall.Id, ptStart, ptEnd, Pole2D.To2D(arc.Center), arc.Normal, width / 2.0, width / 2.0);
			}
			return result;
		}

		public static Pole2D TransformWallToStructure2DPole(Curve curve, ElementId id, double posiWidth, double negaWidth)
		{
			Pole2D result = null;
			XYZ ptStart = Pole2D.To2D(curve.GetEndPoint(0));
			XYZ ptEnd = Pole2D.To2D(curve.GetEndPoint(1));
			Line line = curve as Line;
			if (null != line)
			{
				result = Pole2D.NewStructure2DPole(id, ptStart, ptEnd, posiWidth, negaWidth);
			}
			Arc arc = curve as Arc;
			if (null != arc)
			{
				result = Pole2D.NewStructure2DPole(id, ptStart, ptEnd, Pole2D.To2D(arc.Center), arc.Normal, posiWidth, negaWidth);
			}
			return result;
		}

		private static XYZ To2D(XYZ pt)
		{
			return new XYZ(pt.X, pt.Y, 0.0);
		}

		private ElementId m_ComponentId;

		private XYZ m_ptStart;

		private XYZ m_ptEnd;

		private double m_Bulge;

		private XYZ m_ptPositiveStart;

		private XYZ m_ptPositiveEnd;

		private XYZ m_ptNegativeStart;

		private XYZ m_ptNegativeEnd;

		private bool m_PositiveDirection = true;

		private enum _tagPositionType
		{
			_StartNode,
			_EndNode,
			_OtherPoint
		}
	}
}
